<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>3浮动布局</title>
    <style>
        .fu{
            background-color: yellow;
            overflow: hidden;
            width: 500px;
        }
        .fu>div{
            width: 100px;
            height: 100px;
            border: 3px solid magenta;
        }
        .z1{
            background-color: red;
            float: left;
            /*向父元素边界靠拢*/
        }
        .z2{
            background-color: blue;
            float: left;


        }
        .z3{
            background-color: green;
            float: left;
        }
        ul{
            margin: 0;
            margin-top: 2px;
            padding: 0;
            /*存在默认margin和padding*/
            background-color: #0aa1ed;
            overflow: hidden;
            list-style: none;
            /*去掉实心圆样式*/
        }
        ul>li{
            width: 100px;
            height: 40px;
            /*border: red 1px solid;*/
            float: left;
            text-align: center;
            line-height: 40px;
        }
/*三个元素都浮动，没人支撑父元素高度，发生元素坍塌，使用hidden浮动支撑*/
    </style>
</head>
<body>
<div class="fu">
    <div class="z1"></div>
    <div class="z2"></div>
    <div class="z3"></div>
</div>
<ul>
    <li>首页</li>
    <li>免费课</li>
    <li>猎才课</li>
    <li>大厂就业课</li>
</ul>

</body>
</html>